//package com.fourth;
//
//public class java2_3 {
////    public static void main(String[] args) {
////        int age = 10;
////        for (int i = 0; i < 5; i++) {
////            System.out.print(i + " ");
////        }
////        System.out.println("yes");
////    }
//    //idea调试
//    // shift + F9 开始调试
//    // ctrl + F2 停止调试
//    // F9 跳到下一个断点
//    // F8 进行下一步
//    // F7 进入函数
////}
//package com.fourth;
//
//import java.util.Scanner;
//
//public class java2_3 {
//    //    public static void main(String[] args) {
////        //数组的初始化
//////       （1）静态化初始
//////       （2）动态化初始
//////        int[] age = {18, 19, 20, 21, 22, 23};
//////        for (int i = 0; i < age.length; i++) {
//////            System.out.print(age[i] + " ");
//////        }
//////        Scanner sc = new Scanner(System.in);
//////        int[] age = new int[5];
//////        for (int i = 0; i < age.length; i++) {
//////            System.out.print("请输入第 " + (i+1) + "个数字:");
//////            age[i] = sc.nextInt();
//////        }
//////        for (int i = 0; i < age.length; i++) {
//////            System.out.print(age[i] + " ");
//////        }
////        //静态化：直接赋值
////        //动态化：之后赋值
////    }
////    public static void main(String[] args) {
////        //数组的默认值
////        int[] text1 = new int[5];
////        byte[] text2 = new byte[5];
////        short[] text3 = new short[5];
////        char[] text4 = new char[5];
////        long[] text5 = new long[5];
////        float[] text6 = new float[5];
////        double[] text7 = new double[5];
////        String[] text8 = new String[5]; //null
////        System.out.println(text1[0]);
////        System.out.println(text2[0]);
////        System.out.println(text3[0]);
////        System.out.println(text4[0]);
////        System.out.println(text5[0]);
////        System.out.println(text6[0]);
////        System.out.println(text7[0]);
////        System.out.println(text8[0]);
////    }
////    public static void main(String[] args) {
////        //数组的遍历
////        int[] age = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//////        for (int i = 0; i < age.length; i++) {
//////            System.out.println(age[i]);~
//////        }
////        int sum = 0;
////        for (int i = 0; i < age.length; i++) {
////            sum += age[i];
////        }
////        System.out.println(sum);
////    }
//    public static void main(String[] args) {
//        //数组的存储
//        //数组存放在栈区，但是内容存放在堆区
//        String[] name = {"zhangsan", "lisi", "wangwu", "zhaoliu"};
//        String[] name_put = name;  //将name的地址赋值name_put
//        name_put[1] = "coco";
//        for (int i = 0; i < name_put.length; i++) {
//            System.out.print(name_put[i] + " ");
//        }
//        //name and name_put 指向的是同一块区域
//    }
//}
//package com.fourth;
//
//import java.util.Scanner;
//
//public class java2_3 {
//    //    public static void main(String[] args) {
////        //debug
////        /*
////         * F7 进入函数
////         * F8 下一步
////         * F9 跳到下一个断点
////         * ctrl + F2 停止调试
////         * shift + F9 开始调试
////         * shift + F8 跳出函数
////         */
////        String[] name = {"zhangsan", "lisi", "wangwu", "zhaoliu"};
////        String[] name_put = name;  //将name的地址赋值name_put
////        name_put[1] = "coco";
////        for (int i = 0; i < name_put.length; i++) {
////            System.out.print(name_put[i] + " ");
////        }
////    }
////    public static void main(String[] args) {
//////        //数组的常见问题
//////        int[] score = new int[]{87, 90, 97, 98, 99};
//////        System.out.println(score[5]);  // Index 5 out of bounds for length 5
//////        int[] age = new int[5];
//////        age = null;
//////        System.out.println(age);
//////        System.out.println(age[1]);  // Cannot load from int array because "age" is null
////        //数组名是数组的地址
////
////    }
////    public static void main(String[] args) {
////        //方法  ==  函数
////        int ret = add(2,3);
////        System.out.println(ret);
////        System.out.println("-------------------------");
////        System.out.println(add(3,4));
////    }
////
////    public static int add(int x, int y) {
////        return x + y;
////    }
////    public static void main(String[] args) {
////        Print();
////        PRINT();
////    }
////
////    public static void Print() {
////        System.out.println("hello java!");
////        System.out.println("hello java!");
////        System.out.println("hello java!");
////        System.out.println("hello java!");
////        System.out.println("hello java!");
////    }
////
////    public static void PRINT() {
////        for (int i = 0; i < 5; i++) {
////            System.out.println("hello world!");
////        }
////    }
////    public static void main(String[] args) {
////        //函数都存放在栈区
////        //参数有实参和虚参
////        int a = 10;
////        change(a);
////        System.out.println(a);
////    }
////
////    public static int change(int n) {
////        n += 10;
////        return n;
////    }
////    public static void main(String[] args) {
////        int[] arr1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
////        change(arr1);
////        for(int i = 0;i<arr1.length;i++){
////            System.out.print(arr1[i] + " ");
////        }
////    }
////
////    public static void change(int[] arr) {
////        Scanner sc = new Scanner(System.in);
////        System.out.print("请输入你要修改的数据的索引值是： ");
////        int num = sc.nextInt() - 1;
////        arr[num] = 0;
////    }
//    public static void main(String[] args) {
//
//    }
//}
package com.fourth;

import java.util.Scanner;
//
//public class java2_3 {
//    //    //    public static void main(String[] args) {
//////        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//////        int ret = sum(arr);
//////        System.out.println(ret);
//////    }
//////
//////    public static int sum(int[] arr) {
//////        int sum = 0;
//////        for (int i = 0; i < arr.length; i++) {
//////            sum += arr[i];
//////        }
//////        return sum;
//////    }
////    public static void main(String[] args) {
////        Scanner sc = new Scanner(System.in);
////        System.out.print("请输入一个数字: ");
////        int number = sc.nextInt();
////        jiou(number);
////    }
////
////    public static void jiou(int n) {
////        if (n % 2 == 0) {
////            System.out.println("偶数");
////        } else {
////            System.out.println("奇数");
////        }
////    }
//    public static void main(String[] args) {
//        int[] arr = {1, 2, 3, 4, 5, 6, 7, 100, 8, 9, 10};
//        System.out.println(MAX(arr));
//    }
//
//    public static int MAX(int[] arr) {
//        int max = arr[0];
//        for (int i = 1; i < arr.length; i++) {
//            if (max < arr[i]) {
//                max = arr[i];
//            }
//        }
//        return max;
//    }
}